package com.banan.EnumConstant;
/**
 * 类描述
 * 密码类型
 * Created by lanceq on 2016/8/5.
 */

public enum TypeEnum {


    GAME("YX","游戏"),LIFE("SH","生活"),GAM("SJ","社交");

    TypeEnum(String code,String name){
        this.name=name;
        this.code=code;
    }

    private String  name;
    private String code;

    public  String getName(){
        return this.name;
    }
    public String getCode(){
        return this.code;
    }
    public static String getNamebyCode(String code){
       for(TypeEnum item:TypeEnum.values()){
           if(code.equals(item.getCode())){
              return item.getName();
           }
       }
       return null;
    }
}
